If the project is very large, the application is very many, the URL of the application is written in the root urls.py configuration file, it will be very messy, there will be a name conflict and other issues, which is very detrimental to the
(1) including other UrlconfsFor example, a website project urls.py, including other URLs:From Django.conf.urls import include, urlurlpatterns = [ # ... snip ... URL (r ' ^community/', include (' Django_website.aggregator.urls ')), URL (r ' ^
The class that gets the URL information
Using this class, you can obtain the following information about the URL:
-Host
-Path
-Statuscode (eg. 404,200, ...)
-HTTP Version
-Server
-Content Type
-Date
-the whole header string of the URL
Copy
The complete URL management of Web applications includes two aspects. First, when a user requests a specified URL, the application needs to parse it into understandable parameters. Second, the application needs to provide a method to create a URL
How does the PHP tutorial CMS support Chinese path? Phpcms Chinese URL How to set it?
I'm going to come down here.
First, in the phpcms include directory, there are global.func.php files.
The function createhtml ($file) is
class to get URL informationUsing this class, you can get the following information for the URL:-Host-Path-Statuscode (eg. 404,200, ...)-HTTP Version-Server-Content Type-Date-the whole header string of the URL Copy CodeThe code is as follows:/***
A URL string is a structured string that consists of several meaningful parts. We will inevitably use one of these parts in our work, the most primitive method of using string interception and regular matching is not easy and beautiful, so we
A class for retrieving URL information implemented in php to obtain URL information
Using this class, you can obtain the following URL information:
-Host
-Path
-Statuscode (eg. 404,200 ,...)
-HTTP Version
-Server
-Content Type
-Date
-The whole
Introduction to view and URL configuration experimentsIn the previous chapter, we described how to create a Django project and start the Django Development server. In this chapter you will learn the basics of creating dynamic Web pages with Django.
Get readyCreate a new Django project firstDjango-admin Startproject UrltestAfter entering the directory where manage.py is located./manage.py Startapp app1./manage.py STARTPAP app2At this point we have created a new project named Urltest, with two
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.